package com.qire.manhua.model.vo;

public class HomeRecommendModuleVO {
    public ModuleInfoVO module;
    public ModuleItemVO[] list;
    public ModuleAdVO data;
    public RankListVO rank;

    public class ModuleInfoVO {
        public int id;                              //: 999,
        public String name;                         //: "",
        public int direction;                       //: 4
    }

    // 由于接口没有区分普通模块和最近阅读模块数据的名称，都是用了list，固本地做区分。
    public class ModuleItemVO {
        // 以下是通用模块数据
        public int      book_id;            //10325
        public String   book_name;          //出轨人妻的秘密
        public String   title;              //我的妻子似乎瞒着我什么，直到那天...
        public String   cover_img;          //https://p.qiremanhua.com/uploads/book/201804/5acdd62ad58e4.jpg
        public int      end_state;
        public int      chapter_px;
        public String[] tags;               //["都市","微漫","恋爱"]
        public int      teenager;           //1：禁止青少年观看   0:允许青少年观看

        ////////////////////////////////////////////////////////////////////////////////////////////
        // 以下是最近阅读模块数据

        public int btype;                                   //0
        public BookInfoBean             bookInfo;           //
        public LastReadChapterBean      lastReadChapter;    //
        public LastUpdateChapterBean    lastUpdateChapter;  //

        public boolean isTeensVisible() {
            return teenager == 0;
        }

        public class BookInfoBean {
            public int      id;             //10436
            public String   book_name;      //杀手古德
            public String   book_unruly;    //https://p.qiremanhua.com/uploads/book/201807/5b5bd5ddc235d.jpg
            public String[] tags;           //["都市","热血","爆笑"]
        }

        public class LastReadChapterBean {
            public int      id;             //23965
            public String   chapter_name;   //第1话 第一弹
            public int      chapter_px;     //1
        }

        public class LastUpdateChapterBean {
            public int      id;             //26311
            public String   chapter_name;   //第1117话 散步
            public int      chapter_px;     //1117
            public int      create_time;    //1534141464
        }

    }

    public static class ModuleAdVO {
        public String title;            //: "第二个广告",
        public String img;              //: "https://via.placeholder.com/690x200",
        public int is_open;             //是否开启广告，1为显示，0为不显示；   : "1",
        public String otype;            //广告跳转类型 0-网页，1-详情页，2-阅读页 : "0",
        public String oparam;           //漫画ID target是网页地址 : "0",
        public String target;           //: "javascript:void('第二个广告');"
    }

    public static class RankListVO {

        public RankInfoVO[] rank_new;     //: [],
        public RankInfoVO[] sell;         //: [],
        public RankInfoVO[] free;         //: []

        public class RankInfoVO {

            public int      id;             //: 10057,
            public String   book_name;      //: "不嫁总裁嫁男仆",
            public String   book_author;    //: "万画筒漫画",
            public String   book_unruly;    //: "https://p.qiremanhua.com/uploads/book/201906/5d0c4f8360268.jpg?x-oss-process=image/quality,q_90/format,webp",
            public String   short_title;    //: "她未婚夫被抢，一夜间身败名裂",
            public int      end_state;      //: 0,
            public int      chapter_px;     //: 270,
            public int      read_cnt;       //: 264785696,
            public String[] tags;           //: ["恋爱","总裁","都市"]
            public int      teenager;       //: 1：禁止青少年观看   0:允许青少年观看

            public boolean isTeensVisible() {
                return teenager == 0;
            }

        }

    }

}
